﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using FeiraGame_XNA.src.core;
using FeiraGame_XNA.src.core.gameobjects;

namespace FeiraGame_XNA.src.game.gameobject.mob
{
    public class Zombie : Mob
    {
        
        public Zombie(Vector2 Position) :
            base(Tools.Content.Load<Texture2D>("mob/zelinearT"),Elements.DARK)
        {
            this.Position = Position;            
        }
        public override void Initialize()
        {
            Scale = .1f;
            spriteColor = Color.Blue;
            Alpha = 0.1f;
            spriteColor = spriteColor * Alpha;
            this.Life = 100;
            this.Name = "Zombie";
            this.Description.Type = "Zombie";
            this.Description.Text = "Monster";
            this.Description.ScaleFont = 1.5f;
            this.Description.ScaleBG = new Vector2(1.5f, .5f);
            controlOfAnimations();
            base.Initialize();

        }

        /// <summary>
        /// Define as animações do personagem
        /// </summary>
        public void controlOfAnimations()
        {
             //Attack//
            Animation attack = new Animation();
            //Jump//
            Animation jump = new Animation();
            //Walk//
            Animation walk = new Animation();
            walk.Frames = 8;
            walk.Fps = 8;
            walk.Y = 0;
            walk.Width = 227;
            walk.Height = 369;
            //Damage//
            Animation damage = new Animation();
            //Idle//
            Animation idle = new Animation();
            idle.Frames = 8;
            idle.Fps = 8;
            idle.Y = 0;
            idle.Width = 227;
            idle.Height = 369;
        
            base.controlOfAnimations(attack, jump, walk, damage, idle);
        }
           

        public override void Update()
        {
            Speed = new Vector2(0, 1.5f);            
            //Tools.Trace(Description.BaseText.Length.ToString() + "   "+ (Description.BG.Width*Description.ScaleBG).ToString());
            base.Update();
            
        }
    }
}
